package com.ssy.lingxi.platform.manage.model.request.content;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 分类管理 - 新增/修改 - 请求实体类
 * @author fhj
 * @version 2.0.0
 * @date 2021/04/25
 */
@Data
public class ContentCategoryRequest {

    @ApiModelProperty(value = "主键id")
    @NotNull(message = "主键id不能为空", groups = {ContentCategoryRequest.Update.class})
    private Long id;

    @ApiModelProperty(value = "父id（一级时为0）")
    @NotNull(message = "父id不能为空", groups = {ContentCategoryRequest.Add.class, ContentCategoryRequest.Update.class})
    private Long parentId;

    @ApiModelProperty(value = "分类名称")
    @NotEmpty(message = "分类名称不能为空", groups = {ContentCategoryRequest.Add.class, ContentCategoryRequest.Update.class})
    private String name;

    @ApiModelProperty(value = "分类描述")
    private String describe;

    @ApiModelProperty(value = "是否推荐：0.否；1.是；只能同时对7个一级分类下的第三级分类设置推荐分类，且每个一级分类下最多只允许设置2个推荐分类")
    private Integer status;

    @ApiModelProperty(value = "级别")
    @NotNull(message = "级别不能为空", groups = {ContentCategoryRequest.Add.class, ContentCategoryRequest.Update.class})
    private Integer level;

    public interface Add {
    }

    public interface Update {
    }
}
